//
//  STDIOSProvider.h
//  STDRenderSDK
//
//  Created by 陈学明 on 2023/3/15.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

// 获取图片数据
extern void gl_getImageData_func(const char *path, unsigned char **data, int *width, int *height);

// 获取字体路径
extern void gl_getFontPath_func(const char *name, char **path);


struct STDRenderEngineProvider {
    void (*getImageFunc)(const char *path, unsigned char **data, int *width, int *height);
    void (*getFontPath)(const char *name, char **path);
};

//
@interface STDIOSProvider : NSObject

+ (void)getImageDataForPath:(NSString *)path data:(unsigned char **)data width:(int *)width height:(int *)height;

+ (void)getFontPath:(NSString *)name path:(char **)path;

+ (unsigned char *)convertUIImageToBitmapRGBA8:(UIImage *)image;

+ (UIImage *)convertBitmapRGBA8ToUIImage:(unsigned char *)buffer withWidth:(int)width withHeight:(int)height;
@end
